package indi.readbook.example.common.utils.generator;
import org.apache.commons.lang3.time.DateFormatUtils;

import java.util.Date;
import java.util.Random;

public class GeneratorNum {
    public static String format = "yyyyMMddHHmmss";
    public static Random random=new Random();
    public static String generaNum() {
        return DateFormatUtils.format(new Date(), format)+randomNum();
    }

    private static String randomNum(){
        StringBuffer str=new StringBuffer();
        for(int i=0;i<5;i++){
            str.append(random.nextInt(9));
        }
        return str.toString();
    }

}
